<!--
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<div class="ddp-wrap-layout-popup" *ngIf="getShowFlag">
  <div class="ddp-ui-layout-popup">
    <div class="ddp-box-popup3">
      <a href="javascript:" class="ddp-btn-close" (click)="createCancel()"></a>
      <!-- title -->
      <div class="ddp-pop-title">{{'msg.mem.ui.create.title' | translate}}</div>
      <!-- //title -->
      <!-- detail -->
      <div class="ddp-box-detail">
        <!-- 필수 일때 ddp-error 추가 -->
        <div class="ddp-ui-input-form" [ngClass]="{ 'ddp-type-ok' : resultName === true, 'ddp-type-error' : resultName === false }">
          <label class="ddp-label-type">{{'msg.mem.ui.create.fullname' | translate}}</label>
          <div class="ddp-input-check">
            <input type="text" class="ddp-input-type" placeholder="{{'msg.mem.ph.create.fullname' | translate}}"
                   [(ngModel)]="userName"
                   maxlength="50"
                   (keyup)="initNameValidation()"
                   (blur)="nameValidation()">
            <em class="ddp-icon-ok" *ngIf="resultName"></em>
            <em class="ddp-icon-error" (click)="userName = ''; initNameValidation()"></em>
          </div>
          <!-- error -->
          <span class="ddp-ui-error">{{nameMessage}}</span>
          <!-- error -->
        </div>
        <!-- 필수 일때 ddp-error 추가 -->
        <div class="ddp-ui-input-form" [ngClass]="{'ddp-type-ok' : resultId === true, 'ddp-type-error' : resultId === false }">
          <label class="ddp-label-type">{{'msg.mem.ui.create.name' | translate}}</label>
          <div class="ddp-input-check">
            <input type="text" class="ddp-input-type" placeholder="{{'msg.mem.ph.create.name' | translate}}"
                   [(ngModel)]="userId"
                   (keyup)="initIdValidation()"
                   (blur)="idValidation()">
            <em class="ddp-icon-ok" *ngIf="resultId"></em>
            <em class="ddp-icon-error" (click)="userId = ''; initIdValidation()"></em>
          </div>
          <!-- error -->
          <span class="ddp-ui-error">{{idMessage}}</span>
          <!-- error -->
        </div>
        <!-- 필수 일때 ddp-error 추가 -->
        <div class="ddp-ui-input-form" [ngClass]="{'ddp-type-ok' : resultEmail === true, 'ddp-type-error' : resultEmail === false}">
          <label class="ddp-label-type">{{'msg.mem.ui.create.email' | translate}}</label>
          <div class="ddp-input-check">
            <input type="text" class="ddp-input-type" placeholder="{{'msg.mem.ph.create.email' | translate}}"
                   [(ngModel)]="email"
                   (keyup)="initEmailValidation()"
                   (blur)="emailValidation()">
            <em class="ddp-icon-ok" *ngIf="resultEmail"></em>
            <em class="ddp-icon-error" (click)="email = ''; initEmailValidation()"></em>
          </div>
          <!-- error -->
          <span class="ddp-ui-error">{{emailMessage}}</span>
          <!-- error -->
        </div>
        <div class="ddp-pop-detail">
          {{'msg.mem.ui.create.description' | translate}}
        </div>
      </div>
      <!-- detail -->


      <!-- button -->
      <div class="ddp-ui-buttons">
        <a href="javascript:" class="ddp-btn-type-popup" (click)="createCancel()">{{'msg.comm.btn.cancl' | translate}}</a>
        <!-- disabled 시 ddp-disabled 추가 -->
        <a href="javascript:" class="ddp-btn-type-popup ddp-bg-black" (click)="createDone()">{{'msg.comm.btn.done' | translate}}</a>
      </div>
      <!-- //button -->
    </div>
  </div>
</div>
